package com.hotel.BL;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import data.CleaningStatus;
import data.ReservationStatus;
import data.General;
import data.Room;
import data.RoomType;
import data.Salutation;
import data.Package;

public class PopupLogic extends AbstractBL {
	
	public PopupLogic(HttpServletRequest req,HttpServletResponse resp){
		this.req = req;
		this.resp = resp;
	}
	
	public List<Salutation> LoadSalutation(long hotelId) {
		SalutationLogic salutationLogic = new SalutationLogic();
		List<Salutation> salutation = salutationLogic.GetAllSalutation(hotelId);
		return salutation;
	}

	public List<Package> LoadPackage(long hotelId) {
		PackageLogic packageLogic = new PackageLogic(req,resp);
		List<Package> packlist = packageLogic.GetAllPackage(hotelId);
		return packlist;
	}

	public RoomType LoadOccupancy(long roomtype) {
		RoomTypeLogic roomtypeLogic = new RoomTypeLogic(req,resp);
		RoomType roomtypeId = roomtypeLogic.GetRoomType(roomtype);
		return roomtypeId;
	}
	
	public List<Room> LoadRoomWithCache(long hotelId,long roomtype){
		RoomLogic roomLogic = new RoomLogic(req,resp);
		List<Room>  room = roomLogic.GetRoomWithCache(hotelId,roomtype);
		
		return room;
	}

	public List<Room> LoadRoom(long hotelId,long roomtype){
		RoomLogic roomLogic = new RoomLogic(req,resp);
		List<Room>  room = roomLogic.GetRoom(hotelId,roomtype);
		
		return room;
	}
	
	public General LoadGeneral(long hotelId) {
		GenericLogic genericLogic = new GenericLogic(req,resp);
		General general = genericLogic.GetGeneral(hotelId);
		return general;
	}

	public Package LoadPriceRate(long priceRateId){
		PackageLogic packageLogic = new PackageLogic(req,resp);
		Package pack = packageLogic.GetPackage(priceRateId);
		return pack;
		
	}
	
	public List<ReservationStatus> LoadReservationStatus(long hotelId){
		ReservationLogic r = new ReservationLogic(req,resp);
		 List<ReservationStatus> rStatus = r.GetReservationStatus(hotelId);
		return rStatus;
	}
	public List<CleaningStatus> LoadCleaningStatus(long hotelId){
		RoomLogic r = new RoomLogic(req,resp);
		List<CleaningStatus> rStatus = r.GetCleaningStatus(hotelId);
		return rStatus;
	}
}
